home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 October / MACPOWER-1997-10.ISO.7z / MACPOWER-1997-10.ISO / AMUG / PROGRAMMING / Mac F2C 1.3.5.sit / Mac F2C 1.3.5 / Mac F2C v1.3.5 Documentation.rsrc / TEXT_142.txt < prev    next >
Text File  |  1997-06-15  |  2KB  |  23 lines

  1. Mac F2C Compatibility With UNIX f2c
  2.  
  3.  
  4. This version of Mac F2C is based on the UNIX f2c version of 13 Nov 1994.  The UNIX f2c version is maintained and updated on a semi-regular basis.  I plan to update Mac F2C about once a year to incorporate all changes that have been made to the UNIX version during the past year.  I may release interim versions at shorter intervals as required to fix significant bugs and maintain compatibility with Macintosh compiler releases.
  5.  
  6. The C code produced by Mac F2C is identical to that produced by UNIX f2c when f2c is run with the same options.  The option switches fed by Mac F2C to the f2c kernel appear in the status window, so you can replicate a Mac F2C translation with UNIX f2c by using precisely those switches.
  7.  
  8. The support libraries, libI77 and libF77, and the files main.c (renamed F2Cmain.c in Mac F2C) and f2c.h have been modified to work correctly on the Macintosh.  The modifications are required to:
  9.  
  10. 窶「 allow the source code to compile with Macintosh C/C++ compilers;
  11.  
  12. 窶「 adapt the code to the MacOS file and path naming requirements; 
  13.  
  14. 窶「 implement robust run-time error handling;
  15.  
  16. 窶「 provide a minimal Macintosh interface.  
  17.  
  18. All of these changes have been implemented using #ifdef/#endif constructions conditioned on macros pre-defined by the various Macintosh compilers.  If you move the Mac F2C support code to a UNIX machine (or any machine other than a Macintosh), the code automatically reverts to the UNIX f2c original version when preprocessed by a C or C++ compiler.
  19.  
  20. The bottom-line is that you can move code produced by Mac F2C to any other machine and have it work identically (except for the usual machine dependencies in integer size, floating point accuracy, etc.).  You can move the support libraries and F2Cmain.c distributed with Mac F2C to any other computer and it will work just like the original f2c stuff when compiled on that machine (and identically to way they work on the Macintosh except for some differences in the user-interface and the usual 
  21. machine dependencies).
  22.  
  23. What you cannot do is take the UNIX f2c support libraries, main.c, or f2c.h from another system, move them to the Macintosh, and expect them to work without make significant modifications.